# -*- coding: utf-8 -*-
# @Time    : 2021/4/7 19:22
# @Author  : xxue
# @Email   : x_xue1212@163.com
# @File    : 4-7抽奖.py
# @Software: PyCharm
import random

lst = ["李璐", "邓军荣", "陈姝同", "陈柱", "戴芙蓉", "戴军", "段嘉仪", "胡天映", "李乐豪", "罗干"
    , "彭嘉钰", "彭仁杰", "夏思毅", "胥子珍", "姚金池", "张仁杰", "郑波", "蒋才果", "熊雪", "谭欣"]
print(f"原始人员为{lst}")


# 删除人数
def deletenum(x: int):
    for i in range(x):
        dele = input("请输入请假人员的姓名：")
        lst.remove(dele)
        if dele_num == 0:
            break
dele_num = int(input("请输入请假人员的个数："))
deletenum(dele_num)

# 增加人数
def addnum(y: int):
    for i in range(y):
        add = input("请输入新增人员的姓名：")
        lst.append(add)
        if add_num == 0:
            break
add_num = int(input("请输入新增人员的个数："))
addnum(add_num)

# 抽奖
num = int(input("中奖人数:"))
print(f"更新后人员为{lst}")
if num <= len(lst):
    print(random.sample(lst, num))
else:
    print("错误，中奖人数大于总人数")
